AvailabilityReplica.Role property  is always "Unknown"?

Whenever I query AvailabilityReplica.Role property it is always Unknown for all the replica servers participating in the AAG except for the one that Im making the call on.
I do not see this problem when I make the call on primary replica server.

Any idea why it behaves like this and how to get the right information? I do not want to make call to each replica server to get the details.

See the output below.

----------------
AAG details:
----------------
AAG name: Lakers_Fluke
AAG Parent: [fluke]
AAG Primary Replica Server Name: LAKERS
AAG State: Existing
AAG Local Replica Role: Secondary
----------------
REPLICA SERVERS FOLLOWS:
----------------

Replica Server 1.

AAG replica name: FLUKE
AAG Parent: [Lakers_Fluke]
AAG State: Existing
AAG replica mode: AsynchronousCommit
AAG SConnection tate: Connected
AAG Operational State: Online
AAG Role: Secondary

Replica Server 2.

AAG replica name: LAKERS
AAG Parent: [Lakers_Fluke]
AAG State: Existing
AAG replica mode: AsynchronousCommit
AAG SConnection tate: Unknown
AAG Operational State: Unknown
AAG Role: Unknown

Replica Server 3.

AAG replica name: WARRIORS
AAG Parent: [Lakers_Fluke]
AAG State: Existing
AAG replica mode: AsynchronousCommit
AAG SConnection tate: Unknown
AAG Operational State: Unknown
AAG Role: Unknown
----------------
August 6th, 2012 10:54pm

What does the SQL Errorlog say? And what are the messages in the AlwaysOn Health XEvent Trace?
Edit: The output of this query would also help:

select

*fromsys.dm_hadr_availability_replica_states

  • Edited by PrinceLucifer Tuesday, August 07, 2012 6:19 AM Another idea
Free Windows Admin Tool Kit Click here and download it now
August 7th, 2012 6:18am

Everything looks normal. Here is my observation after connecting to a replica server through SMO and querying for AAG properties...

If the replica server role is not primary, roles of other replica servers in the group are always unknown. If it is primary it gets me the roles of all serves correctly.

Please help me with it.

August 7th, 2012 6:45pm

I still would like to see the output of my query before as well as the SQL Errorlogs from both servers... It might look normal, but maybe there are some details in there that can help us get on the right track
Free Windows Admin Tool Kit Click here and download it now
August 8th, 2012 5:14am

Thanks for trying to get me out of this situation. Please find the logs @ https://docs.google.com/folder/d/0B-vLicWiTuTmTDJrV2ctMUFsUlU/edit

August 8th, 2012 6:42pm

I do not see a replica server role in SQL Server Management Studio as well. Check the screen shot below...
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2012 11:02pm

Looking at your logs the DBs look good actually. The AAG2Warriors Group will not show you the information because you are looking at it from the secondary, which does not have the information. If you open it on the primary you will see.

The only thing in the logs that bothers me a little is the errors in Windows Server Failover Cluster that pop up in the SQL Errorlog. But given that your AGs seem all to be up and healthy it's really hard to say what impact this has...

  • Proposed as answer by Sakarin Thursday, September 06, 2012 5:33 PM
  • Unproposed as answer by Sakarin Thursday, September 06, 2012 5:33 PM
August 11th, 2012 6:26am

Thanks for looking into this and analyzing the logs.

I'm wondering now, if I'm the only one seeing this issue.

Free Windows Admin Tool Kit Click here and download it now
August 11th, 2012 8:23pm

I setup a test environment to repro the issue and I see it the same way you do. Looking through my old mails I can tell you though that this is not by mistake, it is the way it is designed to work... Sorry that I missed that before.
August 12th, 2012 8:34am

Thanks for that. It is sad that MS designed something this way. If you're on a secondary server, there  is no way to find out what his primary server is. He has to logon to all the servers.
  • Edited by HemC Monday, August 13, 2012 7:41 PM
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2012 7:41pm

Hi Please tell me how to fix this problem thank
September 6th, 2012 5:30pm

You are right i faced with this situation too, but if if you will look at the AON group Dashboard you will be able to see roles of the servers....
Free Windows Admin Tool Kit Click here and download it now
March 4th, 2014 7:14am

Hy

same problem, cluster works perfectly but uknow status is still persistent either after update both sql nodes to the last Cum. updates and S.packs.

May 2015

I found this old article related to SQL sp1, https://support.microsoft.com/en-us/kb/2689367/en-us 

is there a workaround or a clear Microsoft explanation that confirm the "Unknow" GUI visualisation is correct?

Thanks 

May 24th, 2015 12:57pm

I know this is an old necro'd thread but I wanted to add some clarity:

If you're on a secondary server, there is no way to find out what his primary server is. He has to logon to all the servers.

There are actually two easy ways:

1. Connect to the listener if one exists.

2. Use sys.dm_hadr_availability_group_states joined to others if you have multiple AGs

-Sean

Free Windows Admin Tool Kit Click here and download it now
May 24th, 2015 4:37pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics